package com.company.array;

public class ArrayDemo05 {
    public static void main(String[] args) {


        //四行二列的数组

        /*
        1，2      arrary[0]
        2，3      arrary[1]
        3，4      arrary[2]
        4，5      arrary[3]
         */
        int[][] array = {{1,2},{2,3},{3,4},{4,5}};

//        System.out.println(array[0][0]);
//        System.out.println(array[0][1]);
//        System.out.println(array[1][1]);
//        System.out.println(array[1][0]);
        for (int i = 0; i < array.length ; i ++){
            for (int j = 0 ; j < array[i].length ; j++){
                System.out.println(array[i][j]);
            }
        }
    }
    //打印数组元素
    public static void printArray(int[] arrays) {
        for (int i = 0; i < arrays.length; i++) {
            System.out.println(arrays[i] + "");
        }
    }
}

